package com.xiaochuan.tracert.api;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;
import java.util.List;

@RestController
public class TracertApi {
    @RequestMapping("/api/v1/trace/goods/{id}")
    List<String> getGoodsTracePath(@PathVariable(name="id") int goodsId) {
        String info = "商品ID：" + Integer.toString(goodsId);
        return Arrays.asList(info,
                "1. 生产基地： 山东寿光",
                "2.采购中心：山东寿光文家街道",
                "3.物流配送：寿光配送中心",
                "4.配送站：北京东城配送站");
    }
}
